package com.dragon.english_practice_back.config;

import com.dragon.english_practice_back.advisor.TokenRecordAdvisor;
import lombok.AllArgsConstructor;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.deepseek.DeepSeekChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@AllArgsConstructor
@Configuration
public class ChatClientConfig {

    TokenRecordAdvisor tokenRecordAdvisor;

    @Bean
    public ChatClient deepSeekChatClient(DeepSeekChatModel deepSeekChatModel) {
        return ChatClient.builder(deepSeekChatModel)
                .defaultAdvisors(tokenRecordAdvisor)
                .build();
    }
}
